package cn.tedu.manager.pojo.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
public class ManagerSaveDTO {
    @ApiModelProperty("管理员ID")
    private Integer id;

    @ApiModelProperty("权限组ID")
    @NotNull(message = "请选择权限组")
    private Integer roleId;

    @ApiModelProperty("姓名")
    @NotBlank(message = "请填写姓名")
    private String name;

    @ApiModelProperty("登录账号")
    @NotBlank(message = "请填写登录账号")
    private String username;

    @ApiModelProperty("联系方式")
    private String phone;

    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("邮箱")
    @Email(message = "邮箱格式不正确")
    private String email;

    @ApiModelProperty("添加时间")
    @JsonIgnore
    private Date createTime;
}
